{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form class="block-content form" id="simple_form" method="post" action="create">
<h1>{{$stories->lang->line('stories')}}</h1>
<ul class="tabs js-tabs same-height">
    <li class="current"><a href="#tab-locales" title="Locales">{{$stories->lang->line('current')}}</a></li>
    <li><a href="#tab-options" title="Options">{{$stories->lang->line('options')}}</a></li>    
<!--    <li><a href="#tab-seo" title="Seo">{{$stories->lang->line('seo')}}</a> </li>-->
</ul>

<div class="tabs-content">    
        <div id="tab-locales">
            {{if isset($stories->id)}}{{form_hidden('id', $stories->id)}}{{/if}}
            <fieldset class="grey-bg required">			
                <legend>{{$stories->lang->line('required')}}</legend>
                <p>
                    <label for="simple-required">{{$stories->lang->line('story_title')}}</label>
                    
                    <input type="text" name="title" id="simple-required" value="{{if isset($stories->title)}}{{$stories->title}}{{/if}}" class="full-width">
                    {{form_error('title')}}
                </p>
            </fieldset>
            <fieldset>
                <legend>{{$stories->lang->line('other_info')}}</legend>
                <p>
                    <label for="description">{{$stories->lang->line('description')}}</label>
                    <textarea name="description" cols="10" class="full-width text-editor">{{if isset($stories->description)}}{{$stories->description}}{{/if}}</textarea>
                </p>

                <p>
                    <label for="content">{{$stories->lang->line('content')}}</label>
                    <textarea name="content" cols="10" class="full-width text-content tinymcefull">{{if isset($stories->content)}}{{$stories->content}}{{/if}}</textarea>
                </p>
                
                <p>
                    <label for="simple-select">{{$stories->lang->line('cat')}}</label>
                    <select name="category_id" id="simple-select" class="full-width">
                        {{html_options options=$category_list selected=$stories->category_id}} 
                    </select>
                </p>
                <p>
                    <label for="simple-select">{{$stories->lang->line('position')}}</label>
                    <select name="feature" id="simple-select" class="full-width">                      
                        {{html_options options=$stories->feature_list() selected=$stories->feature}}                   
                    </select>
                </p>


            </fieldset>
        </div>
        <div id="tab-options">
            <p>
                <label for="simple-select">{{$stories->localize_label('url_target')}}</label>
                <select name="url_target" id="simple-select" class="full-width">				
                    {{html_options options=$stories->url_target_list() selected=$stories->url_target}}
                </select>
            </p>
            <p>
                <label for="link1">{{$stories->lang->line('link1')}}</label>				
                <textarea cols="10" name="link1" class="full-width text-editor">{{if isset($stories->link1)}}{{$stories->link1}}{{/if}}</textarea>								
            </p>
            <p>
                <label for="link2">{{$stories->lang->line('link2')}}</label>				
                <textarea cols="10" name="link2" class="full-width text-editor">{{if isset($stories->link2)}}{{$stories->link2}}{{/if}}</textarea>								
            </p>
            <p>
                <label for="link3">{{$stories->lang->line('link3')}}</label>				
                <textarea cols="10" name="link3" class="full-width text-editor">{{if isset($stories->link3)}}{{$stories->link3}}{{/if}}</textarea>				
            </p>
            <p>
                <label for="image">{{$stories->localize_label('image')}}</label>				
                <input type="text" name="image" id="image" class="full-width" ondblclick="javascript:imagemanager('image');" value="{{if isset($stories->image)}}{{$stories->image}}{{/if}}">				
            </p>
            <p>
                <label for="link">{{$stories->lang->line('link')}}</label>				
                <input type="text" name="link" class="full-width" value="{{if isset($stories->link)}}{{$stories->link}}{{/if}}">				
            </p>

<!--            <p>
                <label for="simple-select">{{$stories->lang->line('partner')}}</label>
                <select name="partner_id" id="simple-select" class="full-width">
                    {{html_options options=$partner->get_list() selected=$stories->partner_id}}
                </select>
            </p>-->
            <p>
                <label for="simple-select">{{$stories->lang->line('language')}}</label>
                <select name="lang_id" id="simple-select" class="full-width">
                     {{html_options options=$language->get_list() selected=$stories->language_id}}
                </select>
            </p>
            
            <p>
                <label for="image">{{$stories->lang->line('creator')}}</label>				
                <input type="text" name="creator" class="full-width" value="">				
            </p>

            <div class="columns">
                <div class="colx2-left">
                    <label for="content">{{$stories->lang->line('simple-calendar')}}</label>
                    <span class="input-type-text margin-right relative">
                        <input type="text" name="simple-calendar" id="simple-calendar" value="">
                        <img src="{{base_url()}}data/templates/backend/xgo/images/icons/fugue/calendar-month.png" width="16" height="16">
                    </span> 

                </div>
                <p class="colx2-right">					
                    <label for="active">{{$stories->lang->line('active')}}</label>
                    <input type="checkbox" name="active" id="simple-switch-on" value="1" checked="checked" class="switch" onclick="$(this).setActive();">
                </p>
            </div>
            
            <div class="columns">
                <div class="colx2-left">
                    <label for="active">{{$stories->lang->line('viewed')}}<b>1002</b></label>
                </div>
                <p class="colx2-right">					
                    <label for="active">{{$stories->localize_label('updated')}}<b>{{if isset($stories->updated)}}{{$stories->updated}}{{/if}}</b></label>
                </p>
            </div>            
        </div>
<!--        <div id="tab-seo">            
            <p>
                <label for="active">{{$stories->lang->line('seo_title')}}</label>
                <input type="text" name="seo_title" class="full-width" value="{{if isset($stories->seo_title)}}{{$stories->seo_title}}{{/if}}">				
            </p>
            <p>
                <label for="keyword">{{$stories->lang->line('keyword')}}</label>
                <input type="text" name="keyword" class="full-width" value="{{if isset($stories->seo_title)}}{{$stories->seo_title}}{{/if}}">				
            </p>
            <p>
                <label for="metadata">{{$stories->lang->line('metadata')}}</label>
                <textarea name="metadata" cols="10" class="full-width text-editor tinymcesimple">{{if isset($stories->metadata)}}{{$stories->metadata}}{{/if}}</textarea>
            </p>
        </div>-->
        <br/><br/><br/><br/><br/>  
        <fieldset class="grey-bg no-margin">
            <legend>{{$stories->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$stories->lang->line('save')}}</button>
                <button style="float:right" type="button" onclick="window.history.back()">{{$stories->lang->line('back')}}</button>
            </p>
        </fieldset>				
	</div>
</form>
